package com.jiayou.system.entity;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author lishuang
 * @since 2021-07-19
 */
@ApiModel(value = "SysUser对象", description = "用户表")
class SysUser : Model<SysUser>() {

    @ApiModelProperty(value = "主键id")
    var id: String? = null

    @ApiModelProperty(value = "登录账号")
    var username: String? = null

    @ApiModelProperty(value = "真实姓名")
    var realname: String? = null

    @ApiModelProperty(value = "密码")
    var password: String? = null

    @ApiModelProperty(value = "md5密码盐")
    var salt: String? = null

    @ApiModelProperty(value = "头像")
    var avatar: String? = null

    @ApiModelProperty(value = "生日")
    var birthday: LocalDateTime? = null

    @ApiModelProperty(value = "性别(0-默认未知,1-男,2-女)")
    var sex: Boolean? = null

    @ApiModelProperty(value = "电子邮件")
    var email: String? = null

    @ApiModelProperty(value = "电话")
    var phone: String? = null

    @ApiModelProperty(value = "机构编码")
    var orgCode: String? = null

    @ApiModelProperty(value = "性别(1-正常,2-冻结)")
    var status: Boolean? = null

    @ApiModelProperty(value = "删除状态(0-正常,1-已删除)")
    var delFlag: Boolean? = null

    @ApiModelProperty(value = "第三方登录的唯一标识")
    var thirdId: String? = null

    @ApiModelProperty(value = "第三方类型")
    var thirdType: String? = null

    @ApiModelProperty(value = "同步工作流引擎(1-同步,0-不同步)")
    var activitiSync: Boolean? = null

    @ApiModelProperty(value = "工号，唯一键")
    var workNo: String? = null

    @ApiModelProperty(value = "职务，关联职务表")
    var post: String? = null

    @ApiModelProperty(value = "座机号")
    var telephone: String? = null

    @ApiModelProperty(value = "创建人")
    var createBy: String? = null

    @ApiModelProperty(value = "创建时间")
    var createTime: LocalDateTime? = null

    @ApiModelProperty(value = "更新人")
    var updateBy: String? = null

    @ApiModelProperty(value = "更新时间")
    var updateTime: LocalDateTime? = null

    @ApiModelProperty(value = "身份（1普通成员 2上级）")
    var userIdentity: Boolean? = null

    @ApiModelProperty(value = "负责部门")
    var departIds: String? = null

    @ApiModelProperty(value = "多租户标识")
    var relTenantIds: String? = null

    @ApiModelProperty(value = "设备ID")
    var clientId: String? = null


    override fun pkVal(): Serializable? {
        return id
    }

    override fun toString(): String {
        return "{" +
                "id=" + id +
                ", username=" + username +
                ", realname=" + realname +
                ", password=" + password +
                ", salt=" + salt +
                ", avatar=" + avatar +
                ", birthday=" + birthday +
                ", sex=" + sex +
                ", email=" + email +
                ", phone=" + phone +
                ", orgCode=" + orgCode +
                ", status=" + status +
                ", delFlag=" + delFlag +
                ", thirdId=" + thirdId +
                ", thirdType=" + thirdType +
                ", activitiSync=" + activitiSync +
                ", workNo=" + workNo +
                ", post=" + post +
                ", telephone=" + telephone +
                ", createBy=" + createBy +
                ", createTime=" + createTime +
                ", updateBy=" + updateBy +
                ", updateTime=" + updateTime +
                ", userIdentity=" + userIdentity +
                ", departIds=" + departIds +
                ", relTenantIds=" + relTenantIds +
                ", clientId=" + clientId +
                "}"
    }
}
